Pause iTunes with the spacebar while the Mac is locked
You can use the Play/Pause key (F8) on the keyboard to start/stop the playback. You can also play the previous track (F7) and the next track (F9), as well as adjust the Volume: mute (F10) decrease (F11) and increase (F12).