UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JziacNMSlEWuNaYJVlzM4UI/XmXoQgib7jQsDxFj3dQ='
WHERE
key_id = '4126e98f713ad2a2a38f07e4e4cad0fd9264b517b7d01517a51587f470f52e35'
AND (
token = 'JziacNMSlEWuNaYJVlzM4UI/XmXoQgib7jQsDxFj3dQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)