They might well have been (even "probably were") alive until impact with the ocean, but it's unknowable whether they were conscious.
Here is a NASA letter whose purpose is to summarize what's known about the deaths of the astronauts.
It's written by "Joseph P. Kerwin" (an astronaut/physician, M.D.). It says (I quote extracts from it below),
The findings are inconclusive.
the forces to which the crew were exposed during Orbiter breakup were probably not sufficient to cause death or serious injury; and
the crew possibly, but not certainly, lost consciousness in the seconds following Orbiter breakup due to in-flight loss of crew module
pressure.
The forces on the Orbiter at breakup were probably too low to cause
death or serious injury to the crew
Medical analysis indicates that these accelerations are survivable,
and that the probability of major injury to crew members is low.
The separation of the crew compartment deprived the crew of
Orbiter-supplied oxygen, except for a few seconds supply in the
lines. Each crew member's helmet was also connected to a
personal egress air pack (PEAP) containing an emergency supply of
breathing air (not oxygen) for ground egress emergencies, which
must be manually activated to be available. Four PEAP's were
recovered, and there is evidence that three had been activated.
It is possible, but not certain, that the crew lost consciousness due
to an in-flight loss of crew module pressure.
Data to support this is:
The accident happened at 48,000 feet, and the crew cabin was at that altitude or higher for almost a minute. At that altitude, without an
oxygen supply, loss of cabin pressure would have caused rapid loss of
consciousness and it would not have been regained before water impact.
PEAP activation could have been an instinctive response to unexpected loss of cabin pressure.
If a leak developed in the crew compartment as a result of structural damage during or after breakup (even if the PEAP's had been
activated), the breathing air available would not have prevented rapid
loss of consciousness.
The crew seats and restraint harnesses showed patterns of failure which demonstrates that all the seats were in place and occupied at
water impact with all harnesses locked. This would likely be the case
had rapid loss of consciousness occurred, but it does not constitute
proof.
Impact damage was so severe that no positive evidence for or against
in-flight pressure loss could be found.
In summary:
As for exactly how they they might have survived, the letter also says,
There are uncertainties in our analysis; the actual breakup is not
visible on photographs because the Orbiter was hidden by the gaseous
cloud surrounding the external tank. The range of most probable
maximum accelerations is from 12 to 20 G's in the vertical axis. These
accelerations were quite brief. In two seconds, they were below four
G's; in less than ten seconds, the crew compartment was essentially in
free fall. Medical analysis indicates that these accelerations are
survivable, and that the probability of major injury to crew members
is low.
After vehicle breakup, the crew compartment continued its upward
trajectory, peaking at an altitude of 65,000 feet approximately 25
seconds after breakup. It then descended striking the ocean surface
about two minutes and forty-five seconds after breakup at a velocity
of about 207 miles per hour. The forces imposed by this impact
approximated 200 G's, far in excess of the structural limits of the
crew compartment or crew survivability levels.
Contrary to what Snopes says, it says that if the cabin depressurized the crew would have "rapid loss of consciousness and it would not have been regained before water impact"; whereas Snopes says they would have died.
In summary I suspect they lived for 2 minutes and 45 seconds after the break-up, were killed on impact with the ocean, and may or may not have been conscious during the free fall.