UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uV8C1+QgbARf1cQs+MtM8UWExN0zrQ1GFkHlzPw0Hxo=' 
WHERE 
  key_id = '30eaf74a709665366a1bb3c8b745b25fb9d0f473d071de5b664caf6675e9715a' 
  AND (
    token = 'uV8C1+QgbARf1cQs+MtM8UWExN0zrQ1GFkHlzPw0Hxo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032