Update my jailbroken iPhone 4 iOS 4.2.1 to iOS 7.1.2
Back up your iPhone with iTunes.
Restore your iPhone with iTunes.

If you want your phone jailbroken with iOS 7.1.2, jailbreak it at this point.
Restore your iPhone from backup.