UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'tlScT1uwL/6o5UBZYQ+Ao+C5rObYUyCj2ukSBQ0Dilw=' 
WHERE 
  key_id = 'db92d14c7d105a579a12cc42fbbfab8981c7e4eff588b9b63eeff8843acbf397' 
  AND (
    token = 'tlScT1uwL/6o5UBZYQ+Ao+C5rObYUyCj2ukSBQ0Dilw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029