Locking and unlocking updates the database now