By legal requirement, the CVR must be operated from the start of the first checklist (typically Cockpit Preparation or similar checklist), until after the reading of the final checklist. The CVR can only be erased when the parking brake is set.
If an incident occurs, some aircraft have a marker button on the instrument panel to mark the event, and the CVR circuit breaker will be pulled to preserve the recording, under certain circumstances.
Length of CVR recording may be as little as 2 hours, but most are typically 6+ hours and digital, now. They include area microphones to pick up cockpit sounds such as switches, alarms, etc, as well as microphone channels for the captain and first officer.
Regarding a mishap on a 12 hour flight: if the mishap is severe enough to warrant CVR review, the flight isn't likely to continue for another 6-10 hours; it's probably going to be an air turnback to the point of departure, or a diversion to a different airport.
A mishap in which the CVR will become significant will occuring up until the CVR can no longe record (a crash, for example); the CVR isn't being over-written, because it's no longer recording. The CVR records up to the final moments.