GitLab's paywalled version allows creating "service accounts" and loosens restrictions so that these accounts can have non-expiring personal access tokens.
GitLab 17.3 quietly added a configuration option in all tiers to disable forced token expiration dates.
Admin area → General → Account and limit:
I think we should toggle the forced expiration off in the gitlab.wikimedia.org instance. Once the switch is off we could either figure out how to update the database directly to remove the expiration date from tokens known to be used by infrastructure bots or rotate tokens everywhere to get back to non-expiring tokens.