modifyWithQuery({a: [{x: 1}, {x: 3}]},
    {$and: [{'a.x': 1}, {'a.x': 3}]},
    {$set: {'a.$.x': 5}},
    {a: [{x: 1}, {x: 5}]});