UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hKkffEYphndBSwlUgDm1sbHbCH1TUl21KJLpujOiUQc='
WHERE
key_id = '8ea84bdc48c85cc2618dedcc38edc6eb6a300fb8518ad765ab1cadfaa2daee11'
AND (
token = 'hKkffEYphndBSwlUgDm1sbHbCH1TUl21KJLpujOiUQc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)