UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q7giRrRYFeoWWeu+SqCYJg1HMiJU6umw5Mdx4mHTdvQ='
WHERE
key_id = '559348a6499c12b4cb33c4a82c34753198004f99bfc92ec93886dd7e87152071'
AND (
token = 'Q7giRrRYFeoWWeu+SqCYJg1HMiJU6umw5Mdx4mHTdvQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)