As to any claim for credit or refund filed with the Department on and after January 1 but on or before June 30 of any given year, no amount of tax or penalty or interest erroneously paid (either in total or partial liquidation of a tax or penalty or interest under this Act) more than 3 years prior to such January 1 shall be credited or refunded, and as to any such claim filed on and after July 1 but on or before December 31 of any given year, no amount of tax or penalty or interest erroneously paid (either in total or partial liquidation of a tax or penalty or interest under this Act) more than 3 years prior to such July 1 shall be credited or refunded. Notwithstanding any other provision of this Act to the contrary, for any period included in a claim for credit or refund for which the statute of limitations for issuing a notice of tax liability under this Act will expire less than 6 months after the date a taxpayer files the claim for credit or refund, the statute of limitations is automatically extended for 6 months from the date it would have otherwise expired. No claim shall be allowed for any amount paid to the Department, whether paid voluntarily or involuntarily, if paid in total or partial liquidation of an assessment which had become final before the claim for credit or refund to recover the amount so paid is filed with the Department, or if paid in total or partial liquidation of a judgment or order of court.
35 ILCS 105/21