This question is highly dependent on the overall modelling. Here are a few suggestions, and I am sure more alternatives do exist!
Use a party claim to define the environment. Some attributes such as the issuer iss hold information about the environment, if your project instantiated the protocols with an issuer inside the claim.
Use protocol seeding with an environment parameter in the migration.yml file, with run-only: test for example, in order to pass the environment variable into NPL, and pass it through protocols until where you need it.
(not recommended, but maybe easier for you) If you have a middle layer, like an API, then you can add an argument to the permission instantiating the KYC protocol above. The argument would depend on an environment variable to define which delay it is
Let me know if you need more info about any solution, and if you can find a suitable one in the list.