You could set up an imagespace modifier to fade to nearly black, Have the same script that locks the door apply the modifier, and remove it when you want to lights to come back up. Should work fine, although if someone teleports out they'll probably be stuck in darkness. it might be worth adding an onSingleUpdate loop to see if they're still in the dungeon cell and remove the modifier if not.
It's also possible to apply lighting modifiers to room bounds, or so I seem to recall, but that would be a constant effect and you want this to be toggleable.
[edit]
Look at the werewolf transformation in the companions quest for an example of a fade to black effect. You can find the ImagespaceModifiers in the object window. I'd probably copy the ones used by the werewolf effect and fiddle with the values until I got the darkeness level.
Note that you need three modifiers: one to reduce the lighting over time, one to keep it in a steady state and one to bring it up over time. Although if you want a "lights out" effect, you might be able to get away with just the middle one.