UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'aZITVEyA+f0H17Ha20dxIfDtV1i9C/wdhg4ImwTyKZU='
WHERE
key_id = '5ce0fdb1ec07580226dfc604087b2c5d223aaf469f847f4dc56008a6265f01f6'
AND (
token = 'aZITVEyA+f0H17Ha20dxIfDtV1i9C/wdhg4ImwTyKZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)