Hello.
Since the LG 50LF6000 has no optical output, your best best is this:
HDMI extractor
Simply connect the HDMI of your Cable/tivo/satellite box/PS4/etc on the HDMI IN of this:
Next connect another cable from the HDMI OUT to your LG TV. Next, connect an optical wire from the SPDIF connector to your HTR5640.
This is the single and cheapest solution for connecting a new TV without any output to your HTR5640. If you use OTA DTV though, you cannot use this.