Yes there are locks and electric key switches where you can't remove the key when on. See a locksmith about that.
So far a wiring it to your air conditioner, find an "old timer" who knows what he is doing and this could be installed. Might also need a "relay" installed.
As to sensing a locked door electrically, I think I read about door locks you can buy which have this built in. Ask a locksmith or search google.com
Or old timer security system employees (who know what they are doing) sometimes install devices in doors which sense the door or deadbolt is locked. For some security systems, they want to know if the door is locked or not.
Also if you get an electrician involved, might also be able to turn off the lights as well as the A/C.
Get the right people who know what they are doing and you can do whatever you want.
As to saving on A/C costs, there are things you can do to reduce your energy usage. Like painting the roof white, adding more insulation, installing double pane argon filled Energy Star windows, getting a new energy star air conditioner. Or possibly if just one person in office, installing a window air conditioner in that office and running just that instead of cooling the whole office.
More energy saving tips here...
http://www.energystar.gov