UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l16U7bjHLR6/ufG36rQejTzPvAh3Jv8sxcr6HwnwA2g='
WHERE
key_id = '68402824200a237aced566620b5024972c378016c155bf935edd83c5dca9c9db'
AND (
token = 'l16U7bjHLR6/ufG36rQejTzPvAh3Jv8sxcr6HwnwA2g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)