Mutex lock/unlock step (to prevent race conditions)

Database race condition incident: