They are very similar devices.
The 830 has better build quality, and a much better camera, especially in low light photography.
The 830 has 16GB internal storage, while the 640 has 8GB.
The 830 has full clearblack and full glance for the screen, whereas the 640 has clearblack lite (1 polarizing layer instead of 2) and glance lite (can't show detailed info, or app info such as weather).
The 640 does have a bigger battery though (2500mah vs 2200mah). So it will last longer between charges.
The 830 has separate capacitive buttons beneath the display, whereas the 640 has software buttons built into the display.
Other than that the devices are the same.