How long can sperm live in a condom?

Not long. Many condoms contain spermicide so that alone should kill most of the sperm immediately. Check to see if the condom you were using contains Nonoxynol-9 which is a spermicide.
Here are some ... Good Q but I doubt if being studied to answer your question. But based on the fastidious requirements for sperm survival, I guess sperms would not live longer than one day in considering the change of temperature, possible presence of spermicidal agents in some condom, natural degrading of semen, etc., making sperms less likely to survive long. I hope these info feeding your curiosity and concern.