if (unlocked) { lock