I'm sure there is a molded Ethernet cable roughly that length. I've seen them up to 160ft at $40 USD on Newegg. Not sure where you are located. I'm guessing you are not in the US if you are looking for a length in meters. One option is to go get 40m of CAT6 UTP cable and put the ends on yourself. I know alot of large hardware stores sell CAT 5 and 6, plus small kits for RJ45 connectors and little cheap crimp tools. I'd just buy a cheap metal crimp tool so you have it, and some connectors. I'd also make sure to get stranded Cat6 rather than solid. Solid is used for behind wall installes as it bends and holds it shape. Stranded is more flexible and is what patch cables are made of.
I'd steer clear of stranded for lengths above 5 meters, the cables looses signal, as for a 40 meter cable, 100 meters is the limit for the cable run lengths, I would suggest you find a supplier of the cable and have them make up a custom size for you.
How much does a stranded cooper cable lose over a solid conductor, it can't be much and is probably still good at 100m. I would never use solid conductor cable when putting RJ45's on the end. The pins that are pushed down in an RJ45 can not penetrate a solid wire and in return are bent to either side. Only the edge is touching the side of the wire. When you crimp an RJ45 onto a stranded wire, the pin pushed down between the strands and makes a good connection. Stranded also lays nicer and solid likes to hold it's shape and flop around. It's like wrestling a snake. Do you want to wrestle the snake? No one does.
We've run stranded for pretty long lengths for LAN's and such at 1Gb/s. Maybe not 40m (~130ft), but close to it I bet. Never had an issue. It is important to get a good end crimped on though. I wouldn't rely on the little plastic took it comes with. You can find the pin layouts anywhere on the Internets. If you have a supplier that will make one for you, even better.