UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HlXv3OUU24oRHHfZW6Qo6ov3N3vdIOXw1z2bhCmPwiY='
WHERE
key_id = '1750952aaea87fbd468771ba909c8d6e743bdcacea72be83b5627d53f18a32c8'
AND (
token = 'HlXv3OUU24oRHHfZW6Qo6ov3N3vdIOXw1z2bhCmPwiY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)