Arduino USB electric lock system?
So it should work something like this:
There is one USB port that you need to insert USB flash drive with key written on it. And when you do so, electronics gain power from outlets (12V or 220V) and when you unplug flash drive power is cut.
No USB plugged in = no power
USB plugged in = power on
I will be using this system in my household and probably in car, so compact solutions suit me best.