After the term for which a prisoner is imprisoned has expired, the prisoner shall be detained until the fine and costs are paid, as provided in § 41-3-104.