SQL Update Where Select
Unless there was some trouble with StackOverflow code formatting - It looks like the problem is the use of quotations around the 'temp' in the max select query. 

(SELECT max(time1) FROM 'temp')


Since temp is a table in this case, quotations will not work. Change these single quotations to backticks as shown in the rest of your update statement.

UPDATE `temp` SET `time2`=NOW() WHERE user = 'kraso' and time1 = (SELECT max(time1) FROM `temp` where user = 'kraso')