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(wallet->cs_wallet);
        std::vector<COutput> available;
        AvailableCoins(*wallet, available);
        BOOST_CHECK_EQUAL(available.size(), 2U);
    }
    for (const auto& group : list) {
        for (const auto& coin : group.second) {
            LOCK(wallet->cs_wallet);
            wallet->LockCoin(coin.outpoint);
        }
    }
    {
        LOCK(wallet->cs_wallet);
        std::vector<COutput> available;
        AvailableCoins(*wallet, available);
        BOOST_CHECK_EQUAL(available.size(), 0U);
    }
    
    
    {
        LOCK(wallet->cs_wallet);
        list = ListCoins(*wallet);
    }
    BOOST_CHECK_EQUAL(list.size(), 1U);
    BOOST_CHECK_EQUAL(std::get<PKHash>(list.begin()->first).ToString(), coinbaseAddress);
    BOOST_CHECK_EQUAL(list.begin()->second.size(), 2U);
}
BOOST_FIXTURE_TEST_CASE(wallet_disableprivkeys, TestChain100Setup)