UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7gwQ1/oO2cjn/5cK1pDmrloM7BEmr48b5NZu6DF8Cck=' 
WHERE 
  key_id = 'f6b992aabf3f2e063de2b9be49c75afc11fb2286879f956673295a522b1b39b5' 
  AND (
    token = '7gwQ1/oO2cjn/5cK1pDmrloM7BEmr48b5NZu6DF8Cck=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025