Locking must use exclusive lock on the database