Ghasp Oh, I though it should be easy but there is a catch in your question.
First thought was to create User command:
- Lock Video Tracks. Action: Toggle tracks with selected clips
But when you use it and track becomes locked all selected clips become unselected. So then you can not toggle tracks with selected clips, because there is no selected clips.
One way is to use this User command:
- Lock Video Tracks. Action: un-Lock all tracks
- Lock Video Tracks. Action: Toggle tracks with selected clips
This way you will get two outcomes:
- only tracks with selected clips are locked
- all tracks unlocked
Will it be enough for your workflow?