UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '53rNzTetY2YlCp5vwW9wJ0GAjRir+jwDFf8pn6rAzXo=' 
WHERE 
  key_id = 'e38e3e154cb739b634f1ad6c77be15a1a37fe98fac7541ade1d3e907ae9ef00a' 
  AND (
    token = '53rNzTetY2YlCp5vwW9wJ0GAjRir+jwDFf8pn6rAzXo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051