UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oRzTYhYta7IBZyP+jYyloZPIrCZU9KtmQIKIECorLgU='
WHERE
key_id = 'c43b64ed13cd7af88ca5464313e429e3f1bc152fb91b4b6e713c1ac0fcb634d4'
AND (
token = 'oRzTYhYta7IBZyP+jYyloZPIrCZU9KtmQIKIECorLgU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)