UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7ietg8dA2s6OlEUnQdmzS/Ehk4TqQFFj14MTNZaq8UI=' 
WHERE 
  key_id = 'f1ce4fc014cb27b92efd8d0b13c3392b399bf1d989105d28d2b8fac215ee0eef' 
  AND (
    token = '7ietg8dA2s6OlEUnQdmzS/Ehk4TqQFFj14MTNZaq8UI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018