src: optimize token lookup