Sounds like a magnetically keyed lock.

http://en.wikipedia.org/wiki/Magnetic_keyed_lock