UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MxiQqcOhLzHSWWXreFXiO5jcB8BktsvuXQ8ONA5o0V0='
WHERE
key_id = '44188e894aafda2a9fd16525aa26f32c6e8a6477eb8ebc6e12e36083fcac1e91'
AND (
token = 'MxiQqcOhLzHSWWXreFXiO5jcB8BktsvuXQ8ONA5o0V0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)