I have this query but I want to change the date to delete everything that is from more than 1 hour ago based on the server time (or if not possible by server time by post da
Use:
DELETE FROM wp_posts WHERE post_date < DATE_SUB(NOW(), INTERVAL 1 HOUR) AND post_status = 'publish'
Reference: