I am not a lawyer and am probably wrong. But, the way I understand it, if you "buy" equity in your friends startup, you can at any time demand your money back, or sue your friend.
There are all sorts of weird little rules about equity people ignore. For instance, if you have an LLC, there are rules about people drawing salary and simultaneously holding equity in the company. Most probably won't bite you in the ass if you're just working with friends on a company, but they may take on significance when you try to start your own private VC firm.