The sheriff of Nantucket county shall be entitled to receive from the county his actual traveling expenses incurred in the transportation of prisoners to and from jails and other penal institutions; and the sheriff of each other county, except Suffolk, shall be entitled to receive from the county his actual traveling expenses incurred in the performance of his official duties, exclusive of expenses incurred in the transportation of persons pursuant to section twenty-four.
Mass. Gen. Laws ch. 37, § 21