This is how you do it...
Before you do anything you should go to the far left area and get as close to the right side wall in the little alcove as you can... then prepare to cast your unlock spell find the spot that is max distance from the door but can still cast the spell (15 meters). Remember that spot or if you have it already, you can place a pyramid there. Then go instigate the guards to fight but time it so that the guard with the shield is as far right as he goes (right if you are facing the door). The goal here is to get the guy guarding the door to go break up the fight but he has to be far enough away from the left side corner so that you are no longer in his sight zone. Basically... If your sneak skill is low and you can sneak in that corner when he goes to break up the fight, then you should be able to cast the unlock spell without being noticed. As long as you are not in their line of sight you can technically do anything. Just make sure to stay out of their line of sight and you will be fine.