UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3JVb+q84b2+owHyx/PYd8gwf4G1YwebXS7uu1WFmLQ4=' 
WHERE 
  key_id = 'f73cbc8efadbc353f69cfbb5f03c27f635596a792cdf2c7b7212e190a535fe68' 
  AND (
    token = '3JVb+q84b2+owHyx/PYd8gwf4G1YwebXS7uu1WFmLQ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041