It shall be unlawful for any person who has temporarily or permanently abandoned his public office or employment, as herein defined and described, to receive compensation from public money on account of services or periods of time in his or her public office or employment accruing after such temporary or permanent abandonment and, in the case of temporary abandonment as herein defined, before the resumption of such office or employment as described in Section 1 [10-6-1 N.M. Stat. Ann.] hereof. Any person receiving or paying compensation in violation of this section shall be punished by a fine of not less than two hundred fifty dollars ($250), nor more than one thousand dollars ($1,000), or by imprisonment for not more than one year, or by both such fine and imprisonment.