UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'oyDv4C/k4NKMZis5kOHTVc1bRpBupGfJY04NL5eM00c=' 
WHERE 
  key_id = 'f1448c2048441f56e53dbf7e34ba78550438c08c90acf96c0532c8747080c04d' 
  AND (
    token = 'oyDv4C/k4NKMZis5kOHTVc1bRpBupGfJY04NL5eM00c=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032