Whenever, for any reason, any convict sentenced to the punishment of death shall not have been executed pursuant to such sentence, and the cause shall stand in full force, the supreme court, or the court of the county in which the conviction was had, on the application of the prosecuting attorney, shall issue a writ of habeas corpus to bring such convict before the court; or if he be at large, a warrant for his apprehension may be issued by such court, or any judge thereof.
§ 546.700, RSMo