Thanks for posting the hypo.
The first question is: Can I get to my car? If not, organize the forty and set up a quick defense plan in case the shooter comes into your area.
If you can get out - Do you get the others out first, or go to the car and wait, or go to the car and come back and cover as the other 40 make good their escape? Or do you go on the hunt for the BG?
I have developed for myself what I call a attiitude of "zone defense" for lack of a better term. I am reasonably competent with a pistol, don't panic in stressful situations, and generally am in a leadership position. I have decided in the event of a gunman running amok, I will defend my zone.
By this I mean, I will assist others to escape while I provide cover, and then will escape myself. This works for malls, work, church, etc. I am not trained to search out and handle gunmen at large, but I can think defensively and shoot from cover/concealment.
In this case, if everyone was not out in my area at work, I would probably urge everyone to follow me out, go to the car, grab the pistol, and return to cover the stragglers, and then beat a final retreat. Hopefully those folks would be out and gone before I could get to the car and back.
This thread will soon degenerate into a question as to whether one should take the risk to defend others. I believe I should. Men need to reassert themselves as the protectors in society, and realize there is something at stake greater than themselves. I work with Scouts and spend a lot of time teaching them that their greatest responsibility is not themselves (although that is important), but what they do to improve (and protect) society as a whole.
Men (or maybe better stated - males) dominate gang culture, drug culture, and crime in general. It takes men who are lawful (not just LEO's) to stand up to these brutes otherwise we will cede whole cities to them. (See New Orleans, inner-city Detroit, and specific areas of most major cities.)
It is this view that would lead me to go back and provide cover.