UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'E6Xmc5Yzjp363uxdNW3vUwGbBzV9A+J95Tt025+ZV/o=' 
WHERE 
  key_id = '181259b082230c37a348d3aa846bd89be206fafae393bb537f74830cdab31a15' 
  AND (
    token = 'E6Xmc5Yzjp363uxdNW3vUwGbBzV9A+J95Tt025+ZV/o=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043