Drupal documentation for lenient composer endpoint.
Install modules that don't declare compatibility with your current Drupal version.
Add modules to the lenient list:
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/token"]'