(a) In any action for penalties under this article, the defendant may move at any time before the trial of the case for an order to stay the further accumulation of the per diem penalty from the day the action is commenced until the same is finally terminated by judgment or otherwise, including the time necessary for judicial review. The housing part of the civil court shall grant the motion if the defendant shows to the satisfaction of the court that there is a substantial and real issue of fact or law concerning the existence of the violation charged. The court may impose such conditions on the granting of the motion as justice may require.
(b) Nothing in this article shall prevent an owner from contesting the finding of a violation by the department, in advance of the department's action for the collection of penalties in the housing part of the civil court of the city of New York or by any other means provided by law. In any such action or proceeding, the court may stay the further accumulation of the per diem penalty in the same manner and under the same conditions as provided in subdivision (a) of this section.