To go a bit deeper...
The key doesn't have to exsist either... so be careful
You'd also need:
redit exflags isdoor closed locked
This will make it a closed and locked door.
Also these optional flags: pickproof, nopassdoor, and bashproof
So, in theory a door set isdoor closed locked pickproof nopassdoor bashproof -- would be ONLY unlockable via the key set in exkey (Or if an Immortal decided to remove the 'locked' or 'closed' flag