UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OX6p4yetgGXLJ8QX9q6Q0XLyG+4ob4M90qd2/jj9UYM='
WHERE
key_id = '808e76df47384ec41d13cefd66b1ef29db43243d2af0825859f109280de4c19a'
AND (
token = 'OX6p4yetgGXLJ8QX9q6Q0XLyG+4ob4M90qd2/jj9UYM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)