UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'LoaIgtcXU9hH+nbPK7pQXQ/SJ6QAdyhj6Q4cSf1LJ20=' 
WHERE 
  key_id = '5e7248a90345b62df0a130ff3adc6e41ecdc298c89b0b6f0ff6b87e0a0240129' 
  AND (
    token = 'LoaIgtcXU9hH+nbPK7pQXQ/SJ6QAdyhj6Q4cSf1LJ20=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021