Limit next_attempt_overflow to TIME_MAX, not INT_MAX

Found while examining #20499 (moved) code