To prevent a test being locked on your card, do not remove it while the VTS unit is trying to communicate to the server, even if it says disconnecting in the status bar at the bottom.
Wait until the unit times you out, i.e. the login screen saying insert smartcard is displayed. Remove the card then and it shouldn't have a vehicle logged onto it anymore. This only works if you actually trying to register a test and the system plays up I think.