The commanding officer of any of the military forces engaged in the suppression of an insurrection, the dispersion of a mob, or the enforcement of the laws shall exercise his or her discretion as to the propriety of firing upon or otherwise attacking any mob or other unlawful assembly; and, if he or she exercises his or her honest judgment thereon, he or she shall not be liable in either a civil or a criminal action for any act done while on such duty. No officer or enlisted person shall be held liable in either a civil or criminal action for any act done under lawful orders and in the performance of his or her duty.