For example.. you have 5 red card for baiting (two of them are expired) and you get a new one, the ban lenght will depend on active red cards, so 4th active baiting red.
But if you reach the maximum infraction, expired or not, gives the permaban.
Quotes from rules thread:
"Expires" refers to period of time after which an infraction for a given offense will expire, i.e. no longer count, for the purposes of temporary bans.
"Maximum" refers to the maximum number of infractions (expired or not) of the same type a user may receive before becoming a candidate for a permanent ban. All infractions, including those that have already expired, are counted when a user is being considered for a permanent ban.