UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fMA/lX3a2cdZyTRiXHEHlbIc1TB9SVJmPPv9FyzmrYY=' 
WHERE 
  key_id = 'dfbbaf96b30ac77cf7d0540d9a4fa41acaf46431f912062e7aae87660f4fc8ab' 
  AND (
    token = 'fMA/lX3a2cdZyTRiXHEHlbIc1TB9SVJmPPv9FyzmrYY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042