UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+93uCzShUQDZavyY2WnpYkKCsLz6tO6c/GiOa9I+aUQ=' 
WHERE 
  key_id = '230d3e1eea093a7e860dcada0826b3c8c1bc323da6d37a54f2d3ef9f6f7278e2' 
  AND (
    token = '+93uCzShUQDZavyY2WnpYkKCsLz6tO6c/GiOa9I+aUQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047