The most recent Mac OS X release (ElmacOS 10.11, El Capitan), seems to have broken ᔕᖺᘎᕊ's answerᔕᖺᘎᕊ's answer using Apple ScriptsAppleScripts, but I found that if I installed https://github.com/gaomd/lock-screen-appLock Screen, and made my Automator Service open its "Lock Screen Bundle", the rest of the process worked as intended (provided I called the Service "lock-screen", not "Lock Screen": apparently spaces in the filename break the keyboard shortcut for many Mac OS XmacOS users).
See https://codingantihero.wordpress.com/2017/02/15/lock-screen-shortcut-on-mac-os-xLock screen shortcut on Mac OS X for an illustrated step-by-step guide.