It's been so long since I've been in school that I don't even know if there are locks on the doors!
If there are, and even if the shooter has keys, if you can quickly open the door, stick a sharpened pencil in the lock (or just a piece of lead from a mechanical pencil) and break it off so there is nothing to grab, the key won't go in.
Even when I was a kid in school, I remember thinking that a classroom with only one door had definite drawbacks.
Sue