On all commercial aircraft which transport passengers for compensation or hire the door which separates the pilot compartment from the passenger compartment shall be kept locked at all times the aircraft is in a flight over this state during which passengers are being transported except:
(a)
During takeoff and landing of the airplane when such door is the means of access to a required passenger emergency exit.
(b)
At such times as it may be necessary to provide access to the flight crew or passenger compartments for the crew members in the performance of their duties, or to provide access for other persons authorized admission to the flight crew compartment.
The pilot of the aircraft shall be guilty of a misdemeanor if the door is not so locked.
It shall be unlawful for any person, except a member of the crew, to have in his possession in the passenger compartment at any time the aircraft is in a flight over this state during which passengers are being transported a key or other device for opening such door from the passenger side of the door.