they could probably have just depressurized their suits and would have lost consciousness extremely quickly.
Whenever asked about cyanide, the astronauts always laughed, because if they wanted to kill themselves, there were about a million ways to do so. They didn't need cyanide.