Delete sensor values in the far future

Hi,

I’ve had a glitch with my hyper-visor which set the system date to something in 2031. Obviously the HA machine followed that clock and now there are a bunch of values in that time. Is there a way to delete everything 2025 and later from the database across all sensors?

Thanks,
Klayman