Any application under this chapter for habeas corpus relief under section 2254 must be filed in the appropriate district court not later than 180 days after final State court affirmance of the conviction and sentence on direct review or the expiration of the time for seeking such review.
(b) The time requirements established by subsection (a) shall be tolled—
from the date that a petition for certiorari is filed in the Supreme Court until the date of final disposition of the petition if a State prisoner files the petition to secure review by the Supreme Court of the affirmance of a capital sentence on direct review by the court of last resort of the State or other final State court decision on direct review;
from the date on which the first petition for post-conviction review or other collateral relief is filed until the final State court disposition of such petition; and
(3) during an additional period not to exceed 30 days, if—
a motion for an extension of time is filed in the Federal district court that would have jurisdiction over the case upon the filing of a habeas corpus application under section 2254; and