Optimized certificate retrieval from token