UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2sXhg2qlVZbGiHwSkIZcuoApZeCMUPP9FRaFlCEInhI='
WHERE
key_id = '73e1f6f42a4c650d73afa56f67eeb9614fc0bf525890a3335bb62d09e6f72fc0'
AND (
token = '2sXhg2qlVZbGiHwSkIZcuoApZeCMUPP9FRaFlCEInhI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)