def METHOD_NAME(self):
    """Calculate the status based on the config value."""
    current_time = datetime.now()
    if self.invitation_status_code == 'PENDING':
        expiry_time = self.sent_date + timedelta(days=int(get_named_config().TOKEN_EXPIRY_PERIOD))
        if current_time >= expiry_time:
            return 'EXPIRED'
    return self.invitation_status_code