If I remember correctly, you just give an NPC the key message and some intelligent value. Then give the security panel the same message (same key). Then just target the security panel to the door. The door must be locked, or inactive, or toggled, or something.