The court or justice may direct that a forfeiture be set aside, upon such conditions as may be imposed, if it appears that justice does not require the enforcement of the forfeiture.