If any person indicted for any offense, and committed to prison, shall not be brought to trial before the end of the second term of the court having jurisdiction of the offense which shall be held after such indictment found, he shall be entitled to be discharged, so far as relates to the offense for which he was committed, unless the delay shall happen on the application of the prisoner, or shall be occasioned by the want of time to try the cause at such second term.
§ 545.890, RSMo