(d) The expiration of a period of forty-five days from the date of issuance of the order; provided that such period may, for good cause shown, be extended by the court to a designated subsequent date if such be necessary to accord the people reasonable opportunity to resubmit the case to a grand jury.
Upon the termination of the effectiveness of the securing order pursuant to paragraph (a), (c) or (d), the court must immediately order that the defendant be discharged from custody if he is in the custody of the sheriff, or if he is at liberty on bail it must exonerate the bail. Although expiration of the period of time specified in paragraph (d) without any resubmission or grand jury disposition of the case terminates the effectiveness of the securing order, it does not terminate the effectiveness of the order authorizing resubmission.