just use lockunspent with "txid":123 to reproduce

isminefilter filter = ISMINE_SPENDABLE;
    if (!request.params[0].isNull()) {
        uint256 blockId;
        blockId.SetHex(request.params[0].get_str());
        BlockMap::iterator it = mapBlockIndex.find(blockId);
        if (it != mapBlockIndex.end()) {
            paltindex = pindex = it->second;
            if (chainActive[pindex->nHeight] != pindex) {
                
                
                
                pindex = chainActive.FindFork(pindex);
            }
        }
    }
    if (!request.params[1].isNull()) {
        target_confirms = request.params[1].get_int();
        if (target_confirms < 1) {
            throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid parameter");
        }
    }
    if (!request.params[2].isNull() && request.params[2].get_bool()) {
        filter = filter | ISMINE_WATCH_ONLY;
    }
    bool include_removed = (request.params[3].isNull() || request.params[3].get_bool());
    int depth = pindex ? (1 + chainActive.Height() - pindex->nHeight) : -1;
    UniValue transactions(UniValue::VARR);
    for (const std::pair<uint256, CWalletTx>& pairWtx : pwallet->mapWallet) {
        CWalletTx tx = pairWtx.second;
        if (depth == -1 || tx.GetDepthInMainChain() < depth) {