This only turns up if you are embedding Lua code inside an XML file (which might happen if you are sticking the Lua inline in your I_*.xml file). Characters which are special to XML (& <, and under some circumstances > " ') need to be escaped because the XML parser does unescaping before your Lua code is extracted.
Don’t like it? There are three workarounds.
One, use a separate L_*.lua file for your Lua. No escaping necessary.
Two, rewrite x < y as y > x. Greater-than doesn’t need to be escaped; > is only there for symmetry with the necessary <. Lua doesn’t use the ampersand character in programs so you won’t ever need to write &.
Three, use CDATA sections, a little-known part of the XML spec: <!CDATA[[ if (x < y) then luup.log(“foo”) end ]]>