UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'a4d+bxctYMKw+oZidYrYg/V0JhmwVwZsWAEFlaL36nQ='
WHERE
key_id = '890eb7b0d8ffa67f8422998f1534c4f59397c4c8df6cc16f0cdeeda17665c83c'
AND (
token = 'a4d+bxctYMKw+oZidYrYg/V0JhmwVwZsWAEFlaL36nQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)