Yes. The purpose of the airport law is to prevent hijackings, not to put innocent people in jail.
If the person can legally possess the gun outside the airport, and can show that a mistake was made, have them pay a small fine, say $200 dollars. It would be enough for them to learn a lesson, but would not destroy their lives.
Just how do you show a mistake was made since it’s a frame of mind?
Maybe we could use the same standards that are used for “HATE” crimes.
Left winger - you love everyone - no crime
Muslim - religion of peace - no crime
Minority - you can’t hate anyone - no crime
Care to take a guess who would end up having to “prove” it was just a mistake?