I would like run a PHP script that runs every second to update a MySQL table.

Suppose this script takes 0.99 seconds, will this prevent website visitors from accessing the website while the script is executed? Will they receive timeouts/internal server errors?
If so, is there a way around this using perhaps some sort of multi-threaded option?

To give more details, I'm trying to create a role playing game that has monsters in it.
These monsters are stored in a table called rpg\_monsters. The monsters table has a ID, target, x and y field and need to look if they are in range of each other to attack possible hostiles.
If they are in range of each other, they need to update their target to that monster ID. Today I still have few monsters, but that number will increase in the future and thus increase execution time of the script.

I understand that in normal cases, you would require a dedicated server for this type of intense work. However, I would like to see how far I can push PHP/MySQL before becoming overloaded.

Thank you in advance!