For cleaning these "Tasks" entries (which are actually Jobs in the DB), you will need to use taskcleaner.sh.The unlock_entity.sh is for removing locks on entities.
Before running the task cleaner, you need to be sure you actually don't have any tasks running in the SPM.
Regarding the snapshot creation on 'apex", can you provide the logs around the time of the operation?