A motorized locking mechanism for locking and unlocking a device having a hub rotatable by a handle about a hub axis. A reversible motor turns a threaded spring screw to move a locking spring and vertically drive a connecting arm between locked and unlocked positions. A locking slide is mounted on the connecting arm and pivots parallel to the hub axis. The parallel pivoting motion of the locking slide protects the locking mechanism against damage. If the locking slide is temporarily prevented from moving into or out of locking engagement with the hub, the motor may still turn and the locking spring subsequently moves the locking slide in the desired direction without the necessity of reactivating the motor.