Implemented Lock command.