UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hJ67RC2+5iqfXxt6TKFaTiQ6L7Pv5D1FucUV9zHi75I=' 
WHERE 
  key_id = '601cb668a4a858e0d5e41d2f3abc99e14fd541a2460e11e007886dc6542a33e3' 
  AND (
    token = 'hJ67RC2+5iqfXxt6TKFaTiQ6L7Pv5D1FucUV9zHi75I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029