UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SnGWXq0sZ+1ggeUZCzOPTJJ7qy8s1gW0Ko1ZfthS9E0=' 
WHERE 
  key_id = '639286118461d648cf713548e2fd47c06cf73df19417e398989867df80be7578' 
  AND (
    token = 'SnGWXq0sZ+1ggeUZCzOPTJJ7qy8s1gW0Ko1ZfthS9E0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022