To lock your machine when leaving your desk, you can use Control + Shift + Eject (if available). But generally, you can use Control + Command + Q.
Source:

To lock your machine when leaving your desk, you can use Control + Shift + Eject (if available). But generally, you can use Control + Command + Q.
Source: