I have a Ryzen 5 2600 and a Ryzen 3 3200G with similar condition, in that there seem to be a bit of glue "leaking" out the gap between the PCB and the heatspreader. Bought brand new.
Never had any problems with performance or heat, and they two worked flawlessly for years (the Ryzen 5 is still running in my PC as we speak, or type). But if you're worried maybe you can return it and ask for another one.
The only way to know would be to install it, run some benchmarks, and see the temperature yourself.