Whenever any action shall be pending on such bond, the defendant may, at any time before judgment rendered in such action, pay to the plaintiff, or bring into court for the plaintiff's use, the principal sum and interest due on such bond, together with costs in such action, and thereupon such action shall be discontinued.
§ 522.180, RSMo