UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kKNE6LH9NXqqEKxT1k9WyAq1OzQkZ+Svv/t32sembVc=' 
WHERE 
  key_id = '75cc7b4e58d1bba51437da48f5ae6a8c02c98b112484ce355ea7ae97f78761b4' 
  AND (
    token = 'kKNE6LH9NXqqEKxT1k9WyAq1OzQkZ+Svv/t32sembVc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028