If any officer, state, county, district, or municipal, except the Public Service Commissioners when in the actual discharge of official duties, shall travel or ride upon any railroad without paying absolutely and without any guile, trick, subterfuge, or evasion whatsoever, the same fare required of passengers generally, or if any railroad company, or officer or employee of any railroad company, shall permit any such state, county, district, or municipal officer, except Public Service Commissioners when in the actual discharge of official duties, to so travel or ride, he or it shall be guilty of a misdemeanor, and shall be fined not less than fifty dollars nor more than five hundred dollars, or be imprisoned in the county jail not less than ten days nor more than sixty days, or both.