UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'M6/qvWdvmlsnGKKL6D+H8E6hyqkMCK17NyRvjWe2h4U=' 
WHERE 
  key_id = '679ff3ac10ac465425c0f44f23ed8f005305369510404e166316cc65cdf416b4' 
  AND (
    token = 'M6/qvWdvmlsnGKKL6D+H8E6hyqkMCK17NyRvjWe2h4U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046