Revert to previous code for lock and unlock safes

Should fix dupe issues introduced with that newer system