The speed of electrons through wire is, at it's slowest around 7/10ths the speed of light.
The speed of light is around 186,000 miles per second or 300,000 kilometers per hour so at worst, the electricity will move at around 125,000 miles per second through wires. . IF you could hear the delay of 0.1 mS or 1/10,000ths of a second... that would mean you should keep the length difference less than 12.5 miles. Generally speaking, humans don't have a problem with 1mS delays so you can stretch that to 125 miles if you like.
It would be hard to do a listening test though--the speed of sound is 690 miles per hour
so a fraction of an inch difference between your speakers and ear drums would require a highly sophisticated measuring system and putting your head in a vice.
Back to reality, no--it won't make a difference as far as electron delay goes. What would make more of a difference is the voltage drop across 40 feet of wire VS the shorter cable. Use the proper wire guage to eliminate that problem and you'll be fine.
Good question though, I've seen people have 25 feet of speaker cable wrapped in a coil to make the cables "even". Tightly wrapping speaker wire in a coil creates additional issues
that would impact the sound than the speed of electrons but I can't blame people to try. For the record, generally it is not a good idea to go past 50 or 60 feet with speaker cable so no worries about different lengths. Generally speaking, shorter is better be it speaker cables, power cords or interconnects--no need to keep them all the same length.