UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uzbulFne6/b2OO2jY1HE6LJRbW40rmGzAn/HozioxMg='
WHERE
key_id = '92c7f7c7e84461942aad7d9da2c165d0ebde7e585e751490a7f967562a22ab2e'
AND (
token = 'uzbulFne6/b2OO2jY1HE6LJRbW40rmGzAn/HozioxMg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)