From Wiki:
TOSLINK cables are usually limited to 5 meters in length, with a technical maximum[1] of 10 meters, for reliable transmission without the use of a signal booster. However, it is very common for interfaces on newer consumer electronics (satellite receivers and PCs with optical outputs) to easily run over 30 meters on even low-cost ($0.75/m) TOSLINK cables.