In case any officer or other such person shall neglect to tender amends, or shall not have tendered sufficient amends, before the action brought, it shall be lawful for him, by leave of the court in which such action shall be brought, at any time before the trial of the action, to pay into court a sum of money by way of amends, to abide the usual practice in such cases.