(a) A public servant commits the crime of official misconduct if, with intent to obtain a benefit or to injure or deprive another person of a benefit, the public servant
(1) performs an act relating to the public servant's office but constituting an unauthorized exercise of the public servant's official functions, knowing that that act is unauthorized; or
(2) knowingly refrains from performing a duty which is imposed upon the public servant by law or is clearly inherent in the nature of the public servant's office.
(b) Official misconduct is a class A misdemeanor.