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?

{
    mapTxSpends.insert(std::make_pair(outpoint, wtxid));
    if (batch) {
        UnlockCoin(outpoint, batch);
    } else {
        WaetBatch temp_batch(GetDatabase());
        UnlockCoin(outpoint, &temp_batch);
    }
    std::pair<TxSpends::iterator, TxSpends::iterator> range;
    range = mapTxSpends.equal_range(outpoint);
    SyncMetaData(range);
}
void CWaet::AddToSpends(const uint256& wtxid, WaetBatch* batch)
{
    auto it = mapWaet.find(wtxid);
    assert(it != mapWaet.end());
    const CWaetTx& thisTx = it->second;
    if (thisTx.IsCoinBase()) // C
        return;
    for (const CTxIn& txin : thisTx.tx->vin)
        AddToSpends(txin.prevout, wtxid, batch);
}
bool CWaet::EncryptWaet(const SecureString& strWaetPassphrase)