UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rfnb3Rp1qTpauRBYRxIriL4/kR+t72Hp6CYzIXjDbTA='
WHERE
key_id = '7c6fbc3694c2efc194f0f2f86ba948c8078c3bbea44e18a1a96e50771f347f89'
AND (
token = 'Rfnb3Rp1qTpauRBYRxIriL4/kR+t72Hp6CYzIXjDbTA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)