UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sbzM30Ja8CWtAbzcwONXgEggnC7E7qO/sJBdXDW4mDM='
WHERE
key_id = '64d25374d7201525b69bfdadee28d8dab7edc1f0dd7d025e358d231bbc7b51e2'
AND (
token = 'sbzM30Ja8CWtAbzcwONXgEggnC7E7qO/sJBdXDW4mDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)