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?

{
    LOCK(cs_);
    if (m_spk_managers.empty()) return false;
    for (OutputType t : OUTPUT_TYPES) {
        auto spk_man = GetScriptPubKeyMan(t, internal);
        if (spk_man && spk_man->CanGetAddresses(internal)) {
            return true;
        }
    }
    return false;
}
void CWaet::SetWaetFlag(uint64_t flags)
{
    LOCK(cs_);
    m__flags |= flags;
    if (!WaetBatch(GetDatabase()).WriteWaetFlags(m__flags))
        throw std::runtime_error(std::string(__func__) + ": writing  flags failed");
}
void CWaet::UnsetWaetFlag(uint64_t flag)
{
    WaetBatch batch(GetDatabase());
    UnsetWaetFlagWithDB(batch, flag);
}
void CWaet::UnsetWaetFlagWithDB(WaetBatch& batch, uint64_t flag)
{
    LOCK(cs_);
    m__flags &= ~flag;
    if (!batch.WriteWaetFlags(m__flags))
        throw std::runtime_error(std::string(__func__) + ": writing  flags failed");
}