Security electromechanical locks