Create a queue on the WAN you want to limit. Put an upperlimit of 5Mbit/s Call it qWANLimit or something
Create a queue on LAN with an upperlimit of 50Mbit/s Name it the same thing.
Create a floating rule on the WAN interface you want to limit, direction out, match all traffic, and set the queue to qWANLimit.
If you have inbound NAT translations or connections, you have to set the queues on those rules too.
If you can, test your queues with upperlimits of, say, 10% of your capacity so you know they're working, then bump them back up.
Sorry, but my test network is on Xen and I haven't rebuilt it with 2.1.5 so I have no altq to test it with.
This is also imperfect in that you should separate TCP from UDP and set an ACK queue on TCP, etc. This is just a general idea of how to get traffic for one WAN into the proper queue.