UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7fZjqUI93MxRDmbc15t7k4WGIftsBUCtAs8RQ1COSrQ='
WHERE
key_id = '88409c69f6360636ec755b629290623b23b8700ace036c4c8a49594b7aa8aae4'
AND (
token = '7fZjqUI93MxRDmbc15t7k4WGIftsBUCtAs8RQ1COSrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)