Submitting this because I dont have the time (or resources) to debug this atm and need a self-reminder:
On Win32 walletpassphrase does not appear to relock after the designated amount of time as it should and as it does on Linux.
Can someone check this on OSX as well?

}
    // 
    if (!passphrempty() && (_creation_flags & WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
        error = Untranslated("Passphrase provided but private keys are disabled. A passphrase is only used to encrypt private keys, so cannot be used for s with private keys disabled.");
        status = DatabaseStatus::FAILED_CREATE;
        return nuptr;
    }
    // 
    context.chain->initMessage(_("Loading …").translated);
    const std::shared_ptr<CWaet>  = CWaet::Create(context, name, std::move(database), _creation_flags, error, warnings);
    if (!) {
        error = Untranslated("Waet creation failed.") + Untranslated(" ") + error;
        status = DatabaseStatus::FAILED_CREATE;
        return nuptr;
    }
    // E
    if (!passphrempty() && !(_creation_flags & WALLET_FLAG_DISABLE_PRIVATE_KEYS)) {
        if (!->EncryptWaet(passphrase)) {
            error = Untranslated("Error: Waet created but failed to encrypt.");
            status = DatabaseStatus::FAILED_ENCRYPT;
            return nuptr;
        }
        if (!create_blank) {
            // U
            if (!->Unlock(passphrase)) {
                error = Untranslated("Error: Waet was encrypted but could not be unlocked");
                status = DatabaseStatus::FAILED_ENCRYPT;
                return nuptr;
            }
            // S