There are so many ways to do this...
Simplest way is to create variable called pause.
Pause button toggles variable as 1 or 0
On each button you want to lock place a condition pause = 0 (which means unpaused)
I've attached a very overly complicated capx. I say overly complicated because I am using an number of tools to stretch your thinking.
Black button is the lock/unlock button