UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'D5OLqvKHtnVz7yH/UdQKMlPZLYxzYI3B/xJ5eXQQWfs=' 
WHERE 
  key_id = 'acfdf3ac748001670b1a263d323969f7c96423de044e0600350a45649ea5c9d8' 
  AND (
    token = 'D5OLqvKHtnVz7yH/UdQKMlPZLYxzYI3B/xJ5eXQQWfs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051