UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '6QQhb/oVzF9Z1SyGl48lT2mrvgjtd1o6oq1auqCllnE=' 
WHERE 
  key_id = '9cd0750a9a20fdf482bdb391e8da930d3bd42e05a56231f3f94e953f194b0d14' 
  AND (
    token = '6QQhb/oVzF9Z1SyGl48lT2mrvgjtd1o6oq1auqCllnE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018