If you lock a table, then nothing can be done on that table by anyone else until that lock is released. So if user A locks a table, and then starts a transaction, then the transaction will proceed since user A holds the lock. If user B then starts a transaction on a table that user A has locked, the transaction user B is starting will wait patiently until they can obtain a lock (which will happen after user A releases the lock).
Not sure about this, but probably around 30 seconds.
Any examples how to use the timestamp field proberly?
I don't have any examples; however, I can explain it.
[indent]You have a form that allows editing of data. Inside that form there is a hidden field for the timestamp. Now, two users (Andy and Bob) are editing the same data. They both opened the same row of data and are seeing the exact same form. Andy finishes his edits quicker than Bob and submits the form first. Your script takes the timestamp from the form (remember it's a hidden field) and compares it to the timestamp of that particular row in the database. Since they're the same, then the row is continued to be updated. During the update, you also update the timestamp field to be the current timestamp (using the NOW() function in MySQL).
Now Bob finishes his edits, after Andy, and submits the form. Bob still has the "old" timestamp hidden in his form. Your script checks Bob's timestamp from the form with that from the database. Since Bob's timestamp is older than the one in the database, you know there is a conflict. So your script stops processing the form, gets the current database values and spits back out an error message and the form again. The error informs them that there have been edits since they started edits. The form now contains the most up-to-date information from the database.[/indent]
That's how that would work.