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?

uint256 next_block_hash;
        chain().findBlock(block_hash, FoundBlock().inActiveChain(block_sti_active).nextBlock(FoundBlock().inActiveChain(next_block).hash(next_block_hash)));
        if (!block.IsNu()) {
            LOCK(cs_);
            if (!block_sti_active) {
                // Abort 
                // marki
                result.last_failed_block = block_hash;
                result.status = ScanResult::FAILURE;
                break;
            }
            for (size_t posInBlock = 0; posInBlock < block.vtx.size(); ++posInBlock) {
                SyncTransaction(block.vtx[posInBlock], TxStateConfirmed{block_hash, block_height, static_cast<int>(posInBlock)}, fUpdate, /*rescan
            }
            // scan 
            result.last_scanned_block = block_hash;
            result.last_scanned_height = block_height;
        } else {
            // could 
            result.last_failed_block = block_hash;
            result.status = ScanResult::FAILURE;
        }
        if (max_height && block_height >= *max_height) {
            break;
        }
        {
            if (!next_block) {
                // break 
                // previ
                break;