UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HDrbvLK+nBgqJmNx+JQjvZa+dIb2hfgXVNLe/PGautE='
WHERE
key_id = '8103a93ca9a7a39e3fcd60142a7bb9dfec57a3383c0c3bf497588f8446fbf859'
AND (
token = 'HDrbvLK+nBgqJmNx+JQjvZa+dIb2hfgXVNLe/PGautE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)