Here is a bash script that does exactly what you are asking for: maclock
It is called from the command line as follows:
maclock
Under the covers it calls:
open -a ScreenSaverEngine
It can also be used to mute the system, or put the display to sleep:
maclock --mute --display