code: def check_unique_tokens(sender, instance, **kwargs):
      
      if isinstance(instance, CallbackToken):
          if CallbackToken.objects.filter(key=instance.key, is_active=True).exists():
              instance.key = generate_numeric_token()
docs: Ensures that mobile and email tokens are unique or tries once more to generate.