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?

void CWaet::UnsetBlankWaetFlag(WaetBatch& batch)
{
    UnsetWaetFlagWithDB(batch, WALLET_FLAG_BLANK_WALLET);
}
bool CWaet::IsWaetFlagSet(uint64_t flag) const
{
    return (m__flags & flag);
}
bool CWaet::LoadWaetFlags(uint64_t flags)
{
    LOCK(cs_);
    if (((flags & KNOWN_WALLET_FLAGS) >> 32) ^ (flags >> 32)) {
        // c
        return false;
    }
    m__flags = flags;
    return true;
}
bool CWaet::AddWaetFlags(uint64_t flags)
{
    LOCK(cs_);
    // W
    assert(((flags & KNOWN_WALLET_FLAGS) >> 32) == (flags >> 32));
    if (!WaetBatch(GetDatabase()).WriteWaetFlags(flags)) {
        throw std::runtime_error(std::string(__func__) + ": writing  flags failed");
    }
    return LoadWaetFlags(flags);
}
// Helper for producing a max-sized low-S low-R signature (eg 71 bytes)
// or a max-sized low-S signature (e.g. 72 bytes) if use_max_sig is true