Database

[{"software_house":"k1","client_id":"1234","transactions":[{"antecedents":12345,"consequents":"015896018","antecedent support":0.0030889166727954697},{"antecedents":"932696735","consequents":"939605046","antecedent support":0.0012502757961314996}]},{"software_house":"k2","client_id":"1234","transactions":[{"antecedents":12345,"consequents":"015896018","antecedent support":0.0030889166727954697},{"antecedents":"932696735","consequents":"939605046","antecedent support":0.0012502757961314996}]}]

Query

db.collection.update({/** the criteria you want to match outside array*/"software_house":"k1","client_id":"1234"},[{"$addFields":{"transactions":{"$filter":{"input":"$transactions","as":"t","cond":{$not:{$and:[/** the criteria you want to match in array*/{$eq:["$$t.antecedents",12345]},{$eq:["$$t.consequents","015896018"]}]}}}}}},{"$addFields":{"transactions":{"$setUnion":["$transactions",[{"antecedents":12345,"consequents":"the entry you want to upsert","antecedent support":-1}]]}}}],{multi:true})

Result