Auto Mute
windows · audio · autohotkey · automationAuto Mute is a small utility that mutes your computer every time you lock it, put it to sleep, or shut down. This means it will always be on mute by default, so you avoid playing sounds in meetings, open offices or in talks or lectures unless you manually turn the sound back on.

You can also accomplish the same thing with an AutoHotkey script:
#l::Gosub, MuteSub
MuteSub:
SoundGet, muted, MASTER, MUTE
if (muted = "Off") {
Send {Volume_Mute}
}
Return
This scripts mutes your computer every time you use Win+l to lock it.