UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/xYns1MICVXohC66nAgKvMyrbOoJa/k9UnVwcL6JKig='
WHERE
key_id = '16586cf939eb1be9e28bf34ebc6a4da54b752b449ae7cbc78c756296216450ca'
AND (
token = '/xYns1MICVXohC66nAgKvMyrbOoJa/k9UnVwcL6JKig='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)