UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'QZbOvZZOf+Bjbv7DDZrjv9UVI0pVBwOzVv0N7xTj1xs='
WHERE
key_id = '73c1bcbc73f193180d73776bea43645c28d034d3d94fc2bc0672f9834a271b9a'
AND (
token = 'QZbOvZZOf+Bjbv7DDZrjv9UVI0pVBwOzVv0N7xTj1xs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)