UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5EId2ogupE1E0+W/jyGT5/gbl2gBkypypVDn0eYydkM=' 
WHERE 
  key_id = '7c5ff0ef1fb83c7c7c16c8a33ad87fd26eba67637e1c6644db5303128480dc7f' 
  AND (
    token = '5EId2ogupE1E0+W/jyGT5/gbl2gBkypypVDn0eYydkM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037