A man who spent nearly 30 years in prison for kidnapping, robbery and rape has been exonerated and freed.