If any such witness shall be committed for a contempt, on account of his refusal to testify, and shall persist in such refusal until the grand jury is dismissed, or until the expiration of his imprisonment, he shall not be discharged without leave of court and until he enters into a recognizance, with sufficient surety, for his appearance at such time as designated by the court.
§ 540.210, RSMo