1.- Download this automator command, double click and install.
2.- Configure in System Preferences -> Keyboard -> Services -> LockScreen
and configure your hot keys
. Mine is command + control + ¡ (works everytime :D)
I know this capture is in spanish, but that's how my mac is configured. Just follow instructions ;)