Whenever a person under conviction for a criminal offense and confined in a county correctional facility is unable to pay the fine, the superior court, upon petition of the prisoner or the superintendent and satisfactory proof of such inability, may order the prisoner to be discharged upon such terms as they may think proper.