Strange CasMismatchError error even when not using CAS in N1QL Query

Not sure what causes this error as i dont use a CAS value for an update when i call the N1QL query to update some tracking information. This query works most of the time but several times it will throw this CasMismatchError and i have no Idea why…

CasMismatchError: cas mismatch
    at Object.translateCppError (C:\NodeJsRoot\URLShortTrack\node_modules\couchbase\dist\bindingutilities.js:196:20)
    at C:\NodeJsRoot\URLShortTrack\node_modules\couchbase\dist\connection.js:248:54 {
  cause: LibcouchbaseError: libcouchbase error 209
      at Object.translateCppError (C:\NodeJsRoot\URLShortTrack\node_modules\couchbase\dist\bindingutilities.js:174:21)
      at C:\NodeJsRoot\URLShortTrack\node_modules\couchbase\dist\connection.js:248:54 {
    code: 209
  },
  context: QueryErrorContext {
    first_error_code: 12009,
    first_error_message: 'DML Error, possible causes include CAS mismatchFailed to perform UPDATE - cause: MCResponse status=KEY_EEXISTS, opcode=SET, opaque=8538, msg: ',
    statement: 'UPDATE Contacts AS d USE KEYS $1\n' +
      '    SET e.opened = true FOR e IN d.emails  WHEN e.tracking_nbr =  $2  AND (e.opened  IS NOT VALUED OR e.opened = false) END,\n' +
      '        e.activityDate = $3 FOR e IN d.emails  WHEN e.tracking_nbr =  $2 AND (e.opened  IS NOT VALUED OR e.opened = false) END,\n' +
      '        d.metrics.nbr_of_email_opened  = d.metrics.nbr_of_email_opened +1 ,\n' +
      '        d.metrics.nbr_of_unique_email_opened =  d.metrics.nbr_of_unique_email_opened +\n' +
      '            CASE WHEN (ANY e IN d.emails SATISFIES e.tracking_nbr = $2 AND (e.opened  IS NOT VALUED OR e.opened = false) END)\n' +
      '                THEN 1 ELSE 0\n' +
      '            END\n' +
      '    WHERE  d._type = "email_campaign" AND ANY e IN d.emails SATISFIES e.tracking_nbr = $2 END;',
    client_context_id: '091c51dbd924fae1',
    parameters: '',
    http_response_code: 200,
    http_response_body: ''
  }
}

UPDATE underneath always uses cas value.
i.e. It will fetch the document with cas and modify document and write with cas.
In between fetch and write if some other user modifies same document it returns cas miss match error (because it can’t overwrite other usesrs data).

so what is the best way to solve this in a N1QL way ? Like i said in my case this update gets triggered when a user opens a email or a link. I have an individual tracking Doc and a summary for the campaign that stores how many total emails where send and how often the campaign was opened or link clicked.
So in case there is 2 people clicking at same time we might try to update while another update is pending as they arrive almost same time.

If CAS miss match you can retry UPDATE