UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EESeSRydqkZifdyB/3qvcVdqD4c4ZuJZkT1X2dljxlU=' 
WHERE 
  key_id = 'c32dd5ba2fcfbc920fcf49d167c1466a84b4644be18622bc76be83c4e8e074f9' 
  AND (
    token = 'EESeSRydqkZifdyB/3qvcVdqD4c4ZuJZkT1X2dljxlU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031