I provide below the raw MYSqlMySQL query and also the code in which I do that programatically. If two requests are being done at the same time results in the following error pattern:
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: update
user_chatsset
updated_at= 2018-06-29 10:07:13 where
id = 1)
SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction (SQL: update user_chats set updated_at = 2018-06-29 10:07:13 where id = 1
)