It would help to know if we are talking about the DDR3 or DDR5 version of the GT 640 and 5670, the type of memory used can make a big difference. Of the three, the Radeon HD 4870 is the fastest, but does not support DirectX 11, and thus will likely run into problems running the latest games as they are rapidly dropping DirectX 9 and some are even dropping DirectX 10 support. AMD has also stopped regular driver support for the 4000 series Radeons and only offers quarterly updates.
Assuming both are using the same memory type, I think the GT 640 is a little bit faster than the 5670, but probably not enough to really justify spending an extra $25 for it. Something like an R7 250 or a Radeon HD 7700 series card would probably be a better option if you are looking for a lower end AMD card.