UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ynuz1ybVuAcB061HNc00lC8WxgSUD/oblfM8gujQsME='
WHERE
key_id = '9b1f7977971b2f5a596c248385c2f0f1dce72a791cf77528b7a6ede32b653955'
AND (
token = 'Ynuz1ybVuAcB061HNc00lC8WxgSUD/oblfM8gujQsME='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)