If the defendant in the judgment so ordered to be stayed shall be in custody, it shall be the duty of the sheriff, if the order were made by the court rendering the judgment, or upon being served with the clerk's certificate and a copy of the order, to keep the defendant in custody without executing the sentence which may have been passed, to abide such judgment as may be rendered upon the appeal or the writ of error.
§ 547.160, RSMo