macOS 10.11, El Capitan, seems to have broken ᔕᖺᘎᕊ's answer using AppleScripts, but I found that if I installed Lock 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 macOS users).
See Lock screen shortcut on Mac OS X for an illustrated step-by-step guide.