UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SLomfWt9roxkbNRSGkXXPtEi8OO+nnH/sIHyic9zf/8=' 
WHERE 
  key_id = '09ff5ba4ba2bacb2e9c0139d4c63d7abfa55594de3c997bd31432247385daa93' 
  AND (
    token = 'SLomfWt9roxkbNRSGkXXPtEi8OO+nnH/sIHyic9zf/8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031