“Sync-Lock” is something that you can turn on/off at any time. Turning it on or off does not change the audio in any way, it just affects what happens when you use command that change the length or position of audio within the project, so in that sense, enabling “Sync-Lock” is a bit like selecting a “tool” or a “mode”. All you need to do is to turn off Sync-Lock, which you can do either form the “Tracks” menu, or by clicking the Sync-Lock button (with a picture of a clock). See: http://manual.audacityteam.org/man/sync_locked_track_groups.html
The Undo items will undo the moves to all tracks, as you probably noticed. Audacity’s Undo is stepwise, so you can never undo B in A, B, C, D without undoing C and D.
It is probably best to redo all and realign the tracks with Sync-Lock Tracks off.