UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/Ro29UAeWsrVz2D2cWH7H5Auo9YIsEOI9AM34d13GUY=' 
WHERE 
  key_id = '1eb011f089a1ed23e1028395974565bf666eb34754f5abba3d8dbc4aaef61a2b' 
  AND (
    token = '/Ro29UAeWsrVz2D2cWH7H5Auo9YIsEOI9AM34d13GUY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017