UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/C0inHyHfUjJdRU9Zss/mbnk/BcnP+hrc1LCFAV8sts=' 
WHERE 
  key_id = 'fb3f9f04654dc6652e25433b5faeb9f325ab7aed92a517b8549b0d94e612111a' 
  AND (
    token = '/C0inHyHfUjJdRU9Zss/mbnk/BcnP+hrc1LCFAV8sts=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028