If you are having problems getting bluetooth-based options to work consistently on your Mac, here is my alternate technique that locks your machine when your put your mouse in the bottom right corner:
* Go to Preferences...Desktop & Screen Saver...Hot Corners
* Set bottom-right corner to "Put Display to Sleep"
* Then in Preferences...Security & Privacy enable "Require Password after sleep or screen saver begins"
* Go to Preferences...Desktop & Screen Saver...Hot Corners
* Set bottom-right corner to "Put Display to Sleep"
* Then in Preferences...Security & Privacy enable "Require Password after sleep or screen saver begins"