How can I get a mysql query command to execute after 30 seconds of visiting a php site?
You can make AJAX request for a php script which executes your mysql query, use timer in js.