Walnuts are also high in arginine compared to lysine (2520mg arginine to 466mg lysine in 100g walnuts).
The viruses in cold sores and those in herpes need arginine to replicate. My wife, who gets the occasional cold sore avoids walnuts for this reason. She's found that if she gets a cold sore, supplementing with lysine can make it disappear.
I've no idea if lysine might help with a herpes flare up.
Either way, if you get cold sores or have herpes it might be worth getting some lysine before you start experimenting with walnuts.
Oh, and I eat a handful of walnuts most days - just because I like the taste. And 30+ years of marriage says that cold sores are not particularly communicable.