If the defendant shall, at any time pending an action on any bond of the kind mentioned in section 2A:55-4 of this title, with a penalty, bring into the court where the action shall be pending, all the principal money and interest due on such bond, and all such costs as expended in an action upon such bond, the money so brought in shall be deemed and taken to be in full payment and satisfaction of such bond; and the court shall give judgment to discharge the defendant from the same accordingly.
N.J.S. § 2A:55-5