Once a vehicle is outside the armoury I would recommend that that's it, its just an ordinary vehicle. Otherwise things will get very confusing.
As for unlocking vehicles in the armoury, there are lots of ways you could do it. For example, if a player from the side who has the flag is within 5m of a vehicle, and there is no enemy soldier within 20m, then the vehicle is unlocked: else locked.
Alternatively, if a vehicle is in the armoury then any crew who are of the "wrong" side get ejected.
Alternatively, whenever the flag changes side, a hint appears telling the "wrong" side they have 30s to get out of the armoury or they get deathzoned.